Attribute Macros§
- Defines a bitenum:
#[bitenum(<base-data-type>, exhaustive = true)]
<base-data-type>
is a data type likeu2
oru8
which is used as the storage type when in in bitfields.exhaustive
specifies whether the bitenum includes all possible value of the given base data type (for example, a bitenum overu2
with 4 values is exhaustive) - Defines a bitfield:
#[bitfield(<base-data-type>, default = 0)]
<base-data-type>
is a data type likeu32
which is used to represent all the bits of the bitfield.default
is an optional default when the bitfield is created